<?php
$courseName = getClassCoursCharLimit($data['class_titile']);
$userDetails = getUserTypeByClassCourse('Classes', $data['classes_id']);
$imagePath = getImagePathByClassCourse('Classes', $data['classes_id']);
$url = $this->createAbsoluteUrl('/workshop-'.$data['classes_id'].'/'.$data['class_seo_title']);
$imageName = (ClassImage::getPrimaryImage($data['classes_id']) != '') ? getRequestbaseUrl() .getuploadFolderDir(). SkillConfig::getClassCourseImagePath($imagePath) . '207X145/' . ClassImage::getPrimaryImage($data['classes_id']) : getWorkNoshopimage(SkillConfig::skill_home_category_no_image);
$booknow = ($data['class_type_id'] == CURATED_CLASS_TYPE) ? 'Book Now' : 'Make a Query ';
$priceRange = ClassBatch::findMinMaxPriceByClassbatchforCategoryPage($data['classes_id']);
$trainerResponse = MakeQuery::trainerResponseRate($data['front-user'], $data['backend-user']);
$levelType = classCourseLevelType('Classes', $data['classes_id']);
$cssLevel=LevelCssClassName('Classes', $data['classes_id']);
$locationName = ClassVenue::getLocationNameByVenueId($data['class_venue_id']);
$batchStartDate = date('d  M', strtotime($data['start_date']));
$batchDay = date('D', strtotime($data['start_date']));
?>
<a href="<?php echo $url; ?>">
    <div class="thumbnail">
    <?php echo '<img src="' . $imageName . '"  alt="' . $courseName . '">'; ?>
    <div class="caption">
        <h4><?php echo $courseName; ?></h4>
        <p class="trainer-name">By:<?php echo substr($userDetails->first_name . '  ' . $userDetails->last_name, 0, 20); ?></p>
        <div class="workinfo">
            <span><?php echo $locationName; ?> <span class="rupee"><?php echo $priceRange; ?></span></span>
            <span><?php echo $batchStartDate.' ('.$batchDay.') '; ?></span>
        </div>
        <div class="session">
            <ul class="list-unstyled sessioninfo">
                <li>
                    <span>session</span>
                    <span><?php echo CLASS_NO_SESSION; ?></span>
                </li>
                <li>
                    <span class="<?php echo $cssLevel;?>"></span>
                    <span>Level</span>
                    <span><?php echo $levelType; ?></span>
                </li>
                <li>
                    <span>Response Rate</span>
                    <span><?php echo (!empty($trainerResponse) ? $trainerResponse . '%' : TRAINER_RESPONSE_RATE); ?></span>
                </li>
            </ul>
        </div>
    </div>
</div>
</a>